﻿using System;
using System.Collections;
using System.Drawing;
using TextEditor.TextDocument.Document;

namespace TextEditor
{
    

    public abstract class SmartTagProvider
    {
        public ZYTextElement Element;
        public UcEditorControl OwnerControl;
        public ZYTextDocument OwnerDocument;

        protected SmartTagProvider()
        {
        }

        public virtual void GetCommands(ArrayList myList)
        {
        }

        public virtual Point GetPos()
        {
            if (this.Element != null)
            {
                return new Point(this.Element.Bounds.Right + 2, this.Element.Bounds.Bottom + 2);
            }
            return Point.Empty;
        }

        public virtual bool HandleCommand(SmartTagItem item)
        {
            return false;
        }

        public virtual bool isEnable()
        {
            return false;
        }

        public virtual int ImageIndex
        {
            get
            {
                return 0;
            }
        }
    }
}

